<template>
  <v-card class="mx-auto ma-2" max-width="400">
    <v-card-title>
      <span class="text-h5 font-weight-bold blue-grey--text">每日一言</span>
    </v-card-title>

    <v-card-text class="text-h7 font-weight-bold ma-3">
      {{ hitokoto.hitokoto }}
    </v-card-text>

    <v-card-actions>
      <v-list-item class="grow">
        <v-list-item-content>
          <p class="font-weight-regular font-italic text-h6">From:</p>
          <v-list-item-title class="ml-5 text-h7 font-weight-bold">
            <p class="text-decoration-underline text-wrap">
              {{ hitokoto.from }}
            </p>
          </v-list-item-title>
        </v-list-item-content>
      </v-list-item>
    </v-card-actions>
  </v-card>
</template>

<script>
export default {
  data() {
    return {
      hitokoto: ``,
    };
  },
  mounted() {
    // https://developer.hitokoto.cn/sentence/#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 一言配置参数
    // "http://47.103.8.199:80/hitokoto/?c=a&c=d&c=h"  部署配置
    this.$axios.get("/hitokoto/?c=i&c=d&c=h").then((res) => {
      this.hitokoto = res.data;
    });
  },
};
</script>



